# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=libgxps
pkgver=0.3.2
pkgrel=1
pkgdesc="XPS Documents library"
url="https://wiki.gnome.org/Projects/libgxps"
arch=(x86_64)
license=(GPL2)
depends=(gtk3 libarchive libjpeg-turbo libtiff lcms2)
makedepends=(gobject-introspection gtk-doc git meson)
_commit=f5027ed09c767e8a02e652fbc77dcea79e19e10d  # tags/0.3.2^0
source=("git+https://gitlab.gnome.org/GNOME/libgxps.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D enable-man=true -D enable-gtk-doc=true
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

# vim:set ts=2 sw=2 et:
